]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
loginDialog: Allow right-clicking on button items
authorJasper St. Pierre <jstpierre@mecheye.net>
Fri, 11 Jan 2013 19:05:17 +0000 (14:05 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Wed, 23 Jan 2013 04:42:53 +0000 (23:42 -0500)
In a gdm session, we may not know what mouse orientation the user
may be in, so it makes sense to support both the left and right
mouse buttons to activate login or other items.

Additionally, add the behavior to all modal dialog items, even in
a user session, because it's unlikely that the user will right-click
on buttons, and it makes for an easier implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=688748

js/gdm/loginDialog.js
js/ui/modalDialog.js

index 6bdd9af93ffa3b1794b86ec7e9cd3a9521d3d100..31c04ebaf95e54db0c26f713a9e70d3f53f0466b 100644 (file)
@@ -128,6 +128,7 @@ const UserListItem = new Lang.Class({
 
         let layout = new St.BoxLayout({ vertical: false });
         this.actor = new St.Button({ style_class: 'login-dialog-user-list-item',
+                                     button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
                                      can_focus: true,
                                      child: layout,
                                      reactive: true,
@@ -492,6 +493,7 @@ const SessionListItem = new Lang.Class({
         this.id = id;
 
         this.actor = new St.Button({ style_class: 'login-dialog-session-list-item',
+                                     button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
                                      can_focus: true,
                                      reactive: true,
                                      x_fill: true,
@@ -552,6 +554,7 @@ const SessionList = new Lang.Class({
         this.actor.child = this._box;
 
         this._button = new St.Button({ style_class: 'login-dialog-session-list-button',
+                                       button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
                                        can_focus: true,
                                        x_fill: true,
                                        y_fill: true });
@@ -787,6 +790,7 @@ const LoginDialog = new Lang.Class({
         let notListedLabel = new St.Label({ text: _("Not listed?"),
                                             style_class: 'login-dialog-not-listed-label' });
         this._notListedButton = new St.Button({ style_class: 'login-dialog-not-listed-button',
+                                                button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
                                                 can_focus: true,
                                                 child: notListedLabel,
                                                 reactive: true,
index ac74afdd9060e29876bdf753504d4331b7867ece..78e36dcf325e113c9671c65e89ca101c71a90417 100644 (file)
@@ -157,6 +157,7 @@ const ModalDialog = new Lang.Class({
             keys = [];
 
         let button = new St.Button({ style_class: 'modal-dialog-button',
+                                     button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
                                      reactive:    true,
                                      can_focus:   true,
                                      label:       label });